/**
 * 
 */
package com.google.code.jkippt.util;

/**
 * @author "Federico De Faveri defaveri@gmail.com"
 *
 */
public class ListBuilder {
	
	protected StringBuilder list = new StringBuilder();
	protected boolean first = true;
	protected char separator = ',';
	
	public void addElement(String element)
	{
		if (!first) addSeparator();
		else first = false;
		list.append(element);
	}
	
	protected void addSeparator()
	{
		list.append(separator);
	}
	
	public String build()
	{
		return list.toString();
	}
}
